<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <link rel="stylesheet" href="styles/style.css">
        <link rel="stylesheet" href="styles/theme/atom-one-dark.css">
        <title>例子6-ES6/7常用语法介绍</title>
    </head>
    <body>
        <pre>
            <code>
                // 例子6

                const foo = {}

                foo.a = 1;
                foo.b = 'b';
                foo.c = function(){};
                console.log(foo) // {a: 1, b: "b", c: ƒunction() {}}
                foo = {}; // Uncaught TypeError: Assignment to constant variable
            </code>
        </pre>
        <script src="scripts/libs/highlight.pack.js"></script>
        <script src="scripts/6.js"></script>
        <script>
            hljs.initHighlightingOnLoad();
        </script>
    </body>
</html>